package cn.chinaunicom.mini.program.dingtalk.openapi.model.props;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @ProjectName: dingtalk-property
 * @Package: cn.chinaunicom.mini.program.dingtalk.openapi.model.param
 * @ClassName: DingTalkProps
 * @Description: java类作用描述
 * @Author: wangjc
 * @CreateDate: 2024/6/7
 * @UpdateUser: wangjc
 * @UpdateDate: 2024/6/7
 * @UpdateRemark: 更新内容
 * @Version: 1.0
 */
@Getter
@Setter
@Component
@ConfigurationProperties(prefix = "dingtalk")
public class DingTalkProps {

    /**
     * 企业id 钉钉的 corp_id
     */
    private String corpId;

    /**
     * 应用id
     */
    private String clientId;

    /**
     * 应用密钥
     */
    private String clientSecret;

    /**
     * 应用名称
     */
    private String clientName;

    /**
     * 单点登录秘钥
     */
    private String ssoSecret;

    /**
     * 应用类型 corp/saas
     */
    private String appType;

    /**
     * 部署服务器，没开外网时候，可以使用代理转发
     */
    private HttpProxy httpProxy;

    /**
     * 事件秘钥
     */
    private EventSecret event;

    @Getter
    @Setter
    public static class HttpProxy {
        private int port;
        private String ip;
        private String host;
    }

    @Getter
    @Setter
    public static class EventSecret {
        private String token;
        private String aesKey;
    }
}
